package com.bw.producer.config;

import com.alipay.easysdk.kernel.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AliConfig {

    @Bean
    public Config getConfig(){
        Config config = new Config();
        config.protocol = "https";
        config.gatewayHost = "openapi-sandbox.dl.alipaydev.com";
        config.signType = "RSA2";
        config.appId = "2021000143604976";
        // 为避免私钥随源码泄露，推荐从文件中读取私钥字符串而不是写入源码中
        config.merchantPrivateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCM42v2l5lzt1IVZDnWLixrsc1QtGydfcYtyu+uLC2X8BzoOtapzmhU6kp7qOBezqnfQvAjamLMHXLSzwhNl6gk1u89iD9mDuD5QxcwT42yT+3kavFAt4cUr/8KUO70WSd7f5W+TdQApRkL7prFkG5EbHU7AJfwvrmbZD+8/ZvHSnCjyGqXswrvfkKMZuEme6WcGoatCvkNVvhe0iFe65GoUojRXKcGzN6sZny7hRYoVZwZTE7JGFuIEhH2iSWH9VX6x+osqtQNuL2f8CszsN8E/A3K18U0C5+s1pbKVCczZtRGYIeAaFyxg2N/lSWrBZi1TDloZSqPOrNsUCzTHdTjAgMBAAECggEAEjv04ytnvuRBCWe5XJEJSr7uVb2kORXoKlETiDVLiViYRS4oTj3anvLbxPlsYJjav3yIW+0O8F/3VnVZG8G/D1WKDSqvGeRfFaOrQqNpMWTK4z88DiYyo2jL12f2JUXMqF0w4jpsb9DuVu8AtQUmYFCxM3u2LoBgwU3OOgWQvdAhaYULP4U/4HYQbIbMsSNNH6x3CEfide2mP510Q9/vQ6HygjhBI29Fx0JumnvOliTzwwcsju2B7BxtcEfvqF4o8liHVuY9aEGZ+5AR6NNIanHhiIMZCX1Dc4xWMYrKZELrbfYbBSP2iaBRrIgvRWThQc0UvNKJpCzQnCSlzxLcwQKBgQDDrwb9EJDD0y0j8tk7/MxMTUHU8CMFZxzqhLJPWHJgi26yufaviNLAaVhnyC1zUCjtVrZPogBlHdm/PvfCpjzJha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k8ZUz0r2DNOz07IL8yqw1fXS6BqEMHuZ4NHgD4mBxzIqp682JGK1danjjS5vRMcvSu0bFt5coAHNVmbVrNxL2xpv8+E6a8zlCvvvg9Sq3rx/czMBcLFj0UjDNwIDAQAB";
        //可设置异步通知接收服务地址（可选）
        config.notifyUrl = "http://8ytzws.natappfree.cc/aliPay/config";
        return config;
    }

}
